package tk.leafotto.sign2.utils.net;

import retrofit2.Call;
import tk.leafotto.sign2.bean.ResBaseModel;
import tk.leafotto.sign2.bean.VersionModel;

public class ComApi {

    public static ComApi comApi;
    private ComInterface mComInterface;

    public static ComApi getInstance() {
        synchronized (ComApi.class) {
            if (comApi == null) {
                comApi = new ComApi();
            }
        }
        return comApi;
    }

    private ComApi() {
        mComInterface = NetClient.newRetrofit().create(ComInterface.class);
    }

    /**
     * 检测版本
     *
     * @return 回调
     */
    public Call<ResBaseModel<VersionModel>> checkVersion() {
        return mComInterface.checkVersion();
    }
}
